package me.yobol.algorithm.inaction.netease;

import java.util.Scanner;

/**
 *
 * @author Yobol
 */
public class Demo02 {
    
    public static int spend(int n,int[] x,int[] y,int offX,int offY,int walkTime,int taxiTime){
        
        int wCost = (Math.abs(offX) + Math.abs(offY)) * walkTime;
        if (n == 0) {
            return wCost;
        }
        
        //比较n个点中哪一个点距离原点最近
        int sLength;//距离原点的距离
        int oLength;//距离办公室的距离
        int sMin = Integer.MAX_VALUE;
        int oMin =Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            if ((sLength = Math.abs(x[i]) + Math.abs(y[i])) < sMin) {
                sMin = sLength;
            }
            if ((oLength = Math.abs(offX - x[i]) + Math.abs(offY - y[i])) < oMin) {
                oMin = oLength;
            }
        }
        
        int tCost = oMin * taxiTime + sMin * walkTime;
        
        return (tCost > wCost )? wCost : tCost;
    }
    
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while(in.hasNext()){
            int n = in.nextInt();
            int[] x = new int[n];
            int[] y = new int[n];
            for (int i = 0; i < n; i++) {
                x[i] = in.nextInt();
            }
            
            for (int i = 0; i < n; i++) {
                y[i] = in.nextInt();
            }
            
            int offX = in.nextInt();
            int offY = in.nextInt();
            int walkTime = in.nextInt();
            int taxiTime = in.nextInt();
            System.out.println(spend(n, x, y, offX, offY, walkTime, taxiTime));
        }
    }
}
